home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
vector.lha
/
vector
/
vectest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-11-23
|
687b
|
31 lines
//% CC -I. vectest.c -o vectest -lm
#include "hvector.h"
#include "hmatrix.h"
main() {
Vector fnull(0,0,0),
fcomponent(1,2,3),
fcopy(fcomponent);
cout << "Null vector = " << fnull << endl
<< "Componentwise constructor = " << fcomponent << endl
<< "Reference constructor = " << fcopy << endl;
if (fcomponent != fcopy)
cout << "fcomponent != fcopy (bogus)\n";
HVector h(fcomponent),
hassign = fcomponent;
HVector hequal;
hequal = fcomponent;
cout << "Homogenous h(v) = " << h << endl
<< "h = v = " << hassign << endl
<< "h; h = v = " << hequal << endl;
Vector vassign = h;
cout << "Assign back v = h = " << vassign << endl;;
}